/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ClientGui;
import clientData.ForumData;
import javax.swing.*;
import java.awt.Color;
import java.awt.Component;

 /*
 * @author iziko
 */

public class ForumCellRenderer extends JLabel implements ListCellRenderer{

      public ForumCellRenderer() {
        setOpaque(true);
     }
     public Component getListCellRendererComponent(
         JList list,
         Object value,
         int index,
         boolean isSelected,
         boolean cellHasFocus)
     {
         setText(((ForumData)value).getName());
        setBackground(isSelected ? Color.CYAN: Color.white);
        setForeground(isSelected ? Color.black : Color.black);
         return this;
     }



}
